package com.aspose.cells;

class zarg {
   private zapy a;
   private zcfw b;
   private static final com.aspose.cells.b.c.a.za c = new com.aspose.cells.b.c.a.za(new String[]{"font-face-decls", "styles", "automatic-styles", "master-styles", "font-face", "name", "font-family"});

   zarg(zapy var1) {
      this.a = var1;
   }

   void a(com.aspose.cells.a.f.zi var1) throws Exception {
      this.b = zasr.a(var1, "styles.xml", false);
      if (this.b.n()) {
         this.b.a();
      } else {
         this.b.d();
         if (zass.a(this.b)) {
            this.b.d();

            while(zass.a(this.b)) {
               switch(c.a(this.b.p().toLowerCase())) {
               case 0:
                  this.a();
                  break;
               case 1:
                  zare var2 = new zare(this.a, true);
                  var2.c(this.b);
                  break;
               case 2:
                  zapg var3 = new zapg(this.a);
                  var3.a(this.b);
                  break;
               case 3:
                  zaqk var4 = new zaqk(this.a);
                  var4.a(this.b);
                  break;
               default:
                  this.b.a();
               }
            }

         }
      }
   }

   private void a() throws Exception {
      if (this.b.n()) {
         this.b.a();
      } else {
         this.b.d();

         while(zass.a(this.b)) {
            switch(c.a(this.b.p())) {
            case 4:
               this.b();
               break;
            default:
               this.b.a();
            }
         }

      }
   }

   private void b() throws Exception {
      String var1 = null;
      String var2 = null;
      if (this.b.m()) {
         while(this.b.l()) {
            switch(c.a(this.b.p())) {
            case 5:
               var1 = this.b.s();
               break;
            case 6:
               var2 = this.b.s();
            }
         }
      }

      if (var1 != null) {
         if (var2.length() >= 2 && var2.charAt(0) == '\'' && var2.charAt(var2.length() - 1) == '\'') {
            var2 = var2.substring(1, 1 + (var2.length() - 2));
         }

         if (this.a.q.get(var1) == null) {
            this.a.q.put(var1, var2);
         }
      }

      this.b.a();
   }
}
